package so.shanku.essential.utils;

/**
 * Created by Jaelyn on 16/3/11.
 */
public class TouchTool {
    private final float ZL = 1.5F;
    private float startX, startY;


    public float getStartX() {
        return startX;
    }

    public float getStartY() {
        return startY;
    }

    public TouchTool(float startX, float startY) {
        super();
        this.startX = startX;
        this.startY = startY;
    }

    public int getScrollX(float dx) {
        int xx = (int) (startX + dx / ZL);
        return xx;
    }

    public int getScrollY(float dy) {
        int yy = (int) (startY + (dy-startY) / ZL);
        return yy;
    }

    public int getMoveDistance(float dy){
        int yy = (int) ((dy-startY) / ZL);
        return yy;
    };
}
